package com.example.administrator.demorecyclerview;

import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import java.util.List;

/**
 * Created by Administrator on 2018/2/23.
 */

public class Adaptern extends BasePageAdapter<String, BaseRecyclerAdapter.BaseViewHolder> {

    public Adaptern(List<String> data) {
        super(data);
    }


    @Override
    public BaseRecyclerAdapter.BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new BaseViewHolder(new TextView(parent.getContext()));
    }

    @Override
    public void onBindViewHolder(BaseRecyclerAdapter.BaseViewHolder holder, int position) {
        ((TextView) (holder.itemView)).setText(getItem(position));

    }

}